import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("shaqu", { schema: "alumni" })
export class Shaqu {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("varchar", { name: "name", length: 20 })
  name: string;

  @Column("varchar", { name: "video", length: 100 })
  video: string;

  @Column("varchar", { name: "logo", comment: "logo", length: 100 })
  logo: string;

  @Column("varchar", { name: "address", length: 100 })
  address: string;

  @Column("varchar", { name: "postal_code", length: 10 })
  postalCode: string;

  @Column("varchar", { name: "tel", length: 20 })
  tel: string;

  @Column("varchar", { name: "email", length: 50 })
  email: string;

  @Column("varchar", { name: "excerpt", comment: "摘录", length: 200 })
  excerpt: string;

  @Column("text", { name: "content", nullable: true, comment: "介绍" })
  content: string | null;

  @Column("int", { name: "create_time", unsigned: true, default: () => "'0'" })
  createTime: number;

  @Column("int", { name: "update_time", unsigned: true, default: () => "'0'" })
  updateTime: number;
}
